'use strict';
var app = getApp();

function toLog(pageOperation) {
    //要发送的内容
    var logContent = {};
    //时间
    var time = Date.now();
    //用户
    var user = app.globalData.user_info.user_id;
    //链接：用户+时间+操作
    logContent.logInfo = user.toString() + time.toString() + pageOperation.toString();
    wx.request({
        url: `https://wx.jingqi.ink/wxapp/save_user_point`,
        method: 'POST',
        data: logContent
    })
}

module.exports = toLog;